/*
  {
    "spuId": 0,
    "category3Id": 0,
    "skuName": "string",
    "price": 0,
    "weight": "string"
    "skuDesc": "string",
    "skuAttrValueList": [
      {
        "attrId": 0,
        "attrName": "string",
        "valueId": 0,
        "valueName": "string"
      }
    ],
    "skuSaleAttrValueList": [
      {
        "saleAttrId": 0,
        "saleAttrName": "string",
        "saleAttrValueId": 0,
        "saleAttrValueName": "string",
      }
    ],
    "skuImageList": [
      {
        "imgName": "string",
        "imgUrl": "string",
        "isDefault": "string",
      }
    ],
    "skuDefaultImg": "string",
}
*/

export interface SkuAttrValueItem {
  attrId: number;
  attrName: string;
  valueId: number;
  valueName: string;
}

export type SkuAttrValueList = SkuAttrValueItem[];

export interface SkuSaleAttrValueItem {
  saleAttrId: number;
  saleAttrName: string;
  saleAttrValueId: number;
  saleAttrValueName: string;
}

export type SkuSaleAttrValueList = SkuSaleAttrValueItem[];

export type IsDefault = "0" | "1";

export interface SkuImageItem {
  imgName: string;
  imgUrl: string;
  isDefault: IsDefault;
}

export type SkuImageList = SkuImageItem[];

export interface SkuItem {
  skuName: string;
  price: number;
  weight: number;
  skuDesc: string;
  skuImageList: SkuImageList;
  skuDefaultImg: string;
}

export interface SaveSkuItem extends SkuItem {
  skuAttrValueList: string[];
  skuSaleAttrValueList: string[];
}

export interface SaveSkuApiParams extends SkuItem {
  spuId: number;
  category3Id: number;
  skuAttrValueList: SkuAttrValueList;
  skuSaleAttrValueList: SkuSaleAttrValueList;
}
